//
//  FFPanelTransferFuncItem.m
//  LiMaoTransfer
//
//  Created by tt on 2022/5/7.
//

#import "FFPanelTransferFuncItem.h"
#import "FFTransferModule.h"
#import "FFTransferVC.h"
@implementation FFPanelTransferFuncItem

- (NSString *)sid {
    return @"apm.limao.transfer";
}

- (UIImage *)itemIcon {
    return [self imageName:@"func_transfer_normal"];
}

- (BOOL)support:(id<WKConversationContext>)context {
   WKChannel *channel = [context channel];
    if(channel.channelType == WK_PERSON) {
        return true;
    }
    return false;
}

- (void)onPressed:(UIButton *)btn {
    id<WKConversationContext> context = self.inputPanel.conversationContext;
    FFTransferVC *vc = [[FFTransferVC alloc] init];
    vc.uid = [context channel].channelId;
    [vc setOnDealloc:^{
        btn.selected = false;
    }];
    [[WKNavigationManager shared] pushViewController:vc animated:YES];
}
- (NSString *)title {
    return LLang(@"转账");
}

-(UIImage*) imageName:(NSString*)name {
    return [[WKApp shared] loadImage:name moduleID:[FFTransferModule gmoduleId]];
}


@end
